# 0: 第一个首字母大写
# 1: 首字母大写
# k: 任意连续k个字母大写
def name_transfer(name, ttype) :
    temp_name = ""
    transfered_name = []
    if ttype == 0 :
        temp_name = name[0][0].upper() + name[0][1:] + ''.join(name[1:]) # Zhangsanfeng
        transfered_name.append(temp_name)
    elif ttype == 1 :
        temp_name = ""
        for word in name :
            temp_name += word[0].upper() + ''.join(word[1:]) # ZhangSanFeng
        transfered_name.append(temp_name)
    else :
        upper_cnt = ttype
        full_name = ''.join(name)
        full_name_len = len(full_name)
        if full_name_len >= upper_cnt :
            for i in range(full_name_len - upper_cnt + 1) :
                temp_name = full_name[0:i] + full_name[i:i+upper_cnt].upper() + full_name[i+upper_cnt:]
                transfered_name.append(temp_name)
    return transfered_name

# 使用特定连接符连接日期
def date_transfer(data, concator) :
    return concator.join(data)

if __name__ == "__main__" :
    name = ['zhang', 'san', 'feng']
    name = ['zhang', 's', 'f']
    name = ['z', 's', 'f']
    transfered_name = name_transfer(name, 0)
    print(transfered_name)
    # transfered_name = name_transfer(name, 1)
    # print(transfered_name)
    # transfered_name = name_transfer(name, 2)
    # print(transfered_name)
